package com.xiaoyilin.config;

import org.apache.kafka.clients.admin.AdminClient;
import org.apache.kafka.clients.admin.AdminClientConfig;

import java.util.Properties;

/**
 * 配置类
 */
public class Config {

    static String brokerList = "localhost:9092";
    static Properties props = new Properties();

    public static AdminClient initAdminClient() {
        props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, brokerList);
        props.put(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, 30000);
        AdminClient client = AdminClient.create(props);
        return client;
    }


}
